package cn.bigway.app.weavingdesigner.main;

import java.util.EnumSet;

import cn.bigway.app.weavingdesigner.type.WdMenuItemType;
import cn.bigway.app.weavingdesigner.type.WdViewTabType;
import cn.bigway.app.weavingdesigner.util.WdBaseFactory;

final class WdViewTabFactory extends WdBaseFactory<WdViewTab, WdViewTabType> {

	private static final WdViewTabFactory instance = new WdViewTabFactory();

	private WdViewTabFactory() {
		//
	}

	public static WdViewTabFactory getInstance() {
		return instance;
	}

	@Override
	protected WdViewTab create(WdViewTabType type) {
		switch (type) {
		case EVTT_SHAPE:
			return new WdViewTab(type, EnumSet.of(WdMenuItemType.EMIT_IMPORT_IMAGE,
					WdMenuItemType.EMIT_NEW));
		}
		return null;
	}
}
